<?php
	$title2 = '后台管理';
	include 'head.php';
	if($islogin==1){
		if($_SESSION['first_login']!='true'){
			$_SESSION['first_login']='true';
		}
	}else{
		exit("<script language='javascript'>window.location.href='./login.php';</script>");
	}
	$time = date("H:i");
	$zflb=$DB->count("SELECT count(*) from auth_order WHERE 1");
$users=$DB->count("SELECT count(*) from auth_user WHERE 1");
$moneys=$DB->count("select sum(money) from auth_order  where zid='{$udata['uid']}' and status=1");

	if($udata['uid']==1){
$rs=$DB->query("SELECT * FROM auth_user order by id desc");
	}else{
		$rs=$DB->query("SELECT * FROM auth_user WHERE id='{$udata['uid']}' order by id desc");
	}	
	
	if($udata['per_sq']==1){
		$power='超级管理员';
	}else if($udata['per_sq']==2){
		$power='服务管理员';}
	else if($udata['per_sq']==3){
		$power='订单管理员';
	}else if($udata['per_sq']==0){
		$power='已被禁封';
	}
		
?>


       
        <link rel="stylesheet" href="css/font.css"/>
        <link rel="stylesheet" href="css/weui.min.css"/>
        <link rel="stylesheet" href="css/jquery-weui.min.css"/>
        <link rel="stylesheet" href="css/mui.css"/>
        <link rel="stylesheet" href="css/index.css"/>
	
 
    </head>
    <body>
        <header>

            <div class="titlebar reverse" >
                <h1><?=$title2?></h1>
			
            </div>
        </header>

        <article style="padding-bottom:14px;">
            <div class="list-wrap">

<body>
<marquee scrollamount="0" align="center" bgcolor="pink" loop="10"  hspace="90" vspace="50">
<font face="隶书" color="red" size="3">
<?php
if (empty($_SESSION['first_login'])) {
                die("登录过期，请刷新！");
}

            echo "欢迎！".$row[nickname]."！等级：".$power;

?> <fmt:formatDate dateStyle="long" value="${validity.wtrq}" />
</font></marquee></body>


 
                <ul class="app-list">
                      <li>
                        <div class="app-wrap">
<span><?php $stream_opts = [ "ssl" => [ "verify_peer"=>false,"verify_peer_name"=>false,]];
$response = file_get_contents($http_s.$confa."mytj.php?tj=1&url=$_SERVER[HTTP_HOST]&key=$confs[accessKey]",false, stream_context_create($stream_opts));
if(false == $response) 
{echo '<div style="font-size:12px;text-align:center;font-weight:bold;margin-bottom:10px;">  请先设置支付宝接口</div>'; }else{echo  $response;}?></span>
                            <a href="./set.php?act=set-pay">
                          
                                <span>👉支付设置</span>
                            </a>
						
                        </div>
                        
                    </li>
                    <li>
                        <div class="app-wrap">
<span><?php $stream_opts = [ "ssl" => [ "verify_peer"=>false,"verify_peer_name"=>false,]];
$response = file_get_contents($http_s.$confa."mytj.php?tj=2&url=$_SERVER[HTTP_HOST]&key=$confs[accessKey]",false, stream_context_create($stream_opts));
if(false == $response) 
{echo '<div style="font-size:12px;text-align:center;font-weight:bold;margin-bottom:10px;">  服务器线路忙！   <br>请刷新页面！</div>';}else{echo  $response;}
?></span>
                            <a href="./set.php?act=set-smg">
                          
                                <span>👉短信设置</span>
                            </a>
						
                        </div>
                        
                    </li>
                </ul>
            </div>

<ul class="app-list">
                    <li>
                        <div class="app-wrap">
                            <a href="paylist.php">
                                <span> <?echo '共收入<font color="red">' .$moneys.'</font>元';?></span> <span> <?echo '支付列表（<font color="red">' .$zflb.'</font>）条';?></span>
                            </a>
							<div class="instruction">查看统计</div>
                        </div>
                        
                    </li>
                    <li>
                        <div class="app-wrap">
                            
								<?php 	echo'
						
									
<a href="?" onclick="return confirm(\'当前版本限制使用该功能！\');">
                                <span> 会员数<font color="red">' .$users.'</font>人</span>
                                <span>👉会员管理</span>
                            </a>';?>
							<div class="instruction">短信接口配置</div>
                        </div>
                        
                    </li>
                </ul>
            </div>
           
				<div class="card-body">
					<p class="text-muted font-14 mb-4">
						<span><?php $stream_opts = [ "ssl" => [ "verify_peer"=>false,"verify_peer_name"=>false,]];
$response = file_get_contents($http_s.$confa."gg.php?tj=1&url=$_SERVER[HTTP_HOST]&key=$confs[accessKey]",false, stream_context_create($stream_opts));
if(false == $response) 
{ 
echo '<div style="font-size:18px;text-align:center;color:red;font-weight:bold;margin-bottom:10px;">  服务器忙！   <br>请刷新页面！</div>'; 
} 
else 
{ 
echo  $response;  
}
?></span>
					</p>
					<div class="table-responsive">



            </div>
        </article>
        <footer>
        </footer>
    </body>
</html>

<?php
	include "./footer.php";
?>	
		